<script setup>
import { ref, onMounted } from 'vue';
import MdPreview from '../components/MarkdownPreview.vue';
import { get } from '../js/http';

const mdText = ref('');

const loadHelpContent = () => {
    get('/routing/result/help').then(res=>{
        if(res.status){
            mdText.value = res.data;
        }
    })
}

onMounted(()=>{
    loadHelpContent();
})

</script>

<template>
    <div class="help">
        <MdPreview class="preview" :text="mdText"></MdPreview>
    </div>
</template>
<style scoped>
.help{
    height: calc(100vh - 80px);
    overflow: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.preview{
    text-align: left;
    width: calc(100% - 200px);
    height: 100%;
}
</style>
